'use strict';
module.exports = app => {
  const { STRING, INTEGER, BOOLEAN } = app.Sequelize;

  const MallCategory = app.model.define('mall_category', {
    name: {
      type: STRING,
      allowNull: false,
      unique: true,
      comment: '类别名称',
    },
    parentId: {
      type: INTEGER,
      allowNull: false,
      defaultValue: 0,
      comment: '父id',
    },
    status: {
      type: BOOLEAN,
      allowNull: false,
      defaultValue: 1,
      comment: '是否启用 1 true ｜ 0 false',
    },

  });

  return MallCategory;
};
